

<%@ page import="au.org.ala.collectors.Person" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'person.label', default: 'Person')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.create.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${personInstance}">
            <div class="errors">
                <g:renderErrors bean="${personInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="familyName"><g:message code="person.familyName.label" default="Family Name" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'familyName', 'errors')}">
                                    <g:textField name="familyName" maxlength="45" value="${personInstance?.familyName}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="foreNames"><g:message code="person.foreNames.label" default="Fore Names" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'foreNames', 'errors')}">
                                    <g:textField name="foreNames" maxlength="64" value="${personInstance?.foreNames}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="alternativeName"><g:message code="person.alternativeName.label" default="Alternative Name" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'alternativeName', 'errors')}">
                                    <g:textArea name="alternativeName" cols="40" rows="5" value="${personInstance?.alternativeName}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="periodOfActivity"><g:message code="person.periodOfActivity.label" default="Period Of Activity" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'periodOfActivity', 'errors')}">
                                    <g:textField name="periodOfActivity" maxlength="64" value="${personInstance?.periodOfActivity}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="areaOfInterest"><g:message code="person.areaOfInterest.label" default="Area Of Interest" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'areaOfInterest', 'errors')}">
                                    <g:textArea name="areaOfInterest" cols="40" rows="5" value="${personInstance?.areaOfInterest}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="occupation"><g:message code="person.occupation.label" default="Occupation" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'occupation', 'errors')}">
                                    <g:textArea name="occupation" cols="40" rows="5" value="${personInstance?.occupation}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="biog"><g:message code="person.biog.label" default="Biog" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'biog', 'errors')}">
                                    <g:textArea name="biog" cols="40" rows="5" value="${personInstance?.biog}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="imageUri"><g:message code="person.imageUri.label" default="Image Uri" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'imageUri', 'errors')}">
                                    <g:textArea name="imageUri" cols="40" rows="5" value="${personInstance?.imageUri}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="living"><g:message code="person.living.label" default="Living" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'living', 'errors')}">
                                    <g:checkBox name="living" value="${personInstance?.living}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="personContributed"><g:message code="person.personContributed.label" default="Person Contributed" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'personContributed', 'errors')}">
                                    <g:checkBox name="personContributed" value="${personInstance?.personContributed}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="yearOfBirth"><g:message code="person.yearOfBirth.label" default="Year Of Birth" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'yearOfBirth', 'errors')}">
                                    <g:textField name="yearOfBirth" value="${fieldValue(bean: personInstance, field: 'yearOfBirth')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="yearOfBirthUncertain"><g:message code="person.yearOfBirthUncertain.label" default="Year Of Birth Uncertain" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'yearOfBirthUncertain', 'errors')}">
                                    <g:checkBox name="yearOfBirthUncertain" value="${personInstance?.yearOfBirthUncertain}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="yearOfDeath"><g:message code="person.yearOfDeath.label" default="Year Of Death" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'yearOfDeath', 'errors')}">
                                    <g:textField name="yearOfDeath" value="${fieldValue(bean: personInstance, field: 'yearOfDeath')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="yearOfDeathUncertain"><g:message code="person.yearOfDeathUncertain.label" default="Year Of Death Uncertain" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: personInstance, field: 'yearOfDeathUncertain', 'errors')}">
                                    <g:checkBox name="yearOfDeathUncertain" value="${personInstance?.yearOfDeathUncertain}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
